﻿
-- =============================================
-- Author:		David Settino
-- Create date: 01/03/2011
-- Description:	Converts a string representation of
--    a polygon to a Geography Markup Language (GML)
--    representation
-- =============================================

CREATE FUNCTION [dbo].[PolygonToGml](@polygon varchar(500))
RETURNS xml
AS
BEGIN
return geography::STGeomFromText(@polygon, 4326).AsGml();
END